import request from "@/utils/request";
// export function listCheckinInfo(query) {
//   return request({
//     url: "/checkinInfor",
//     method: "get",
//     params: query
//   });
// }

//分页查询未退房数据
export function listCheckinNowInfoPage(query) {
  return request({
    url: "/checkinInfor/queryCheckinInfor",
    method: "get",
    params: query
  });
}
//不分页查询未退房数据
export function queryNowCheckinInforNoPage() {
  return request({
    url: "/checkinInfor/queryNowCheckinInforNoPage",
    method: "get"
  });
}
//分页查询所有数据
export function listCheckinInfoPage(query) {
  return request({
    url: "/checkinInfor/page",
    method: "get",
    params: query
  });
}
//roomNo查询入住信息
export function searchCheckinInfo(roomNo) {
  return request({
    url: "/checkinInfor/queryCheckinInforByRoomNo",
    method: "get",
    params: roomNo
  });
}
//roomId查询入住信息
export function searchCheckinInfoById(checkinInfoId) {
  return request({
    url: "/checkinInfor/" + checkinInfoId,
    method: "get",
    params: checkinInfoId
  });
}
//修改入住信息
export function editCheckinInfo(data) {
  return request({
    url: "/checkinInfor",
    method: "put",
    data: data
  });
}

//添加入住信息
export function addCheckinInfo(data) {
  return request({
    url: "/checkinInfor/chooseRoom",
    method: "post",
    data: data
  });
}

//删除入住信息
export function deleteCheckinInfo(checkinInfoId) {
  return request({
    url: "/checkinInfor/delete/" + checkinInfoId,
    method: "delete"
  });
}

//添加入住信息
export function returnCusList(data) {
  return request({
    url: "/checkinInfor/returnCusList",
    method: "post",
    data: data
  });
}

//计算价格
export function getPrice(data) {
  return request({
    url: "/checkinInfor/getPrice",
    method: "post",
    data: data
  });
}

//最终确认入住付费
export function confirmInsert() {
  return request({
    url: "/checkinInfor/confirmCheckin",
    method: "get"
  });
}

//最终确认入住付费
export function removeAllCache() {
  return request({
    url: "/checkinInfor/removeCache",
    method: "get"
  });
}

//饼图
export function countByRoomTypeId() {
  return request({
    url: "/checkinInfor/pie",
    method: "get"
  });
}
